package com.oyo.common.enums;

/**
 * booking 来源
 */
public enum BookingChannel {
    Direct(0, "Direct"),
    OTA(1, "Online Travel Agent"),
    Corporate(2, "Corporate"),
    ExtendedBooking(3, "Extended Booking"),
    WalkIn(4, "Walk In"),
    WebsiteEnquiry(5, "Website Enquiry"),
    Email(6, "Email"),
    JustDial(7, "Just-Dial"),
    TravelAgent(8, "Travel Agent"),
    GoogleAds(9, "Google Ads"),
    Affiliate(10, "Affiliate"),
    Facebook(11, "Facebook"),
    Twitter(12, "Twitter"),
    Block(13, "Block"),
    Owner(14, "Owner"),
    Referral(15, "Referral"),
    Other(16, "Other"),
    WebBooking(17, "Web Booking"),
    Sulekha(18, "Sulekha"),
    Classifieds(19, "Classifieds"),
    Campus(20, "Campus"),
    MobileWebBooking(21, "Mobile Web Booking"),
    IOSApp(22, "IOS App"),
    AndroidApp(23, "Android App"),
    Holidayiq(24, "Holidayiq"),
    Weddings(25, "Weddings"),
    Events(26, "Events"),
    Medicals(27, "Medicals"),
    EmailMarketing(28, "email-marketing"),
    BulkLead(29, "Bulk Lead"),
    CCLead(30, "CC Lead"),
    MissedCall(31, "Missed call"),
    WebTravelAgent(32, "Web_TravelAgent"),
    WebCorporate(33, "Web_Corporate"),
    StudioChannels(34, "Studio Channels"),
    OwnerTA(35, "Owner TA"),
    ThreeP(36, "3P"),
    IRCTC(37, "IRCTC"),
    WindowsApp(38, "Windows App"),
    Airport(39, "Airport"),
    PropertyManager(40, "Property Manager"),
    RailwayStationAgent(41, "Railway Station Agent"),
    BusTravelAgent(42, "Bus Travel Agent"),
    WeddingPlannerAgent(43, "Wedding Planner Agent"),
    MedicalTourism(44, "Medical Tourism"),
    AutoAgent(45, "Auto Agent"),
    CabAgent(46, "Cab Agent"),
    OwnerEngagement(47, "Owner Engagement"),
    JustDialZo(48, "Just-Dial-Zo"),
    Rediff(49, "Rediff"),
    CorporateGuest(50, "CorporateGuest"),
    Counter(51, "Counter"),
    SalesAgent(52, "Sales Agent"),
    SME(53, "SME"),
    CentralLeads(54, "Central Leads"),
    IRCTCTA(55, "IRCTC_TA"),
    JustDialBasic(56, "Just-Dial_Basic"),
    Package(57, "Package"),
    OYOForBusiness(58, "OYO For Business"),
    RetailPartner(59, "Retail Partner"),
    OYOForBusinessPackages(60, "OYO For Business Packages"),
    Packages(61, "Packages"),
    Buyback(62, "Buyback"),
    Migrated(63, "Migrated"),
    Migrated_OTA(64, "Migrated_OTA"),
    Charters(65, "Charters"),
    Promoter(66, "Promoter"),
    WeChatMiniApp(67, "WeChatMiniApp");

    Integer code;
    String name;

    BookingChannel(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String fromCode(Integer code) {
        BookingChannel[] types = values();
        for (BookingChannel type : types) {
            if (type.getCode().equals(code)) {
                return type.getName();
            }
        }
        return null;
    }

}